<?php

namespace app\admin\service;

use app\admin\model\UM as UM;
use ShidianUtil\Exception\DataNotExistException;
use app\admin\dao\AccessDao;
use app\common\model\Access;
use think\Collection;

/**
 * Class PagesService
 * @package app\admin\service
 */
class PagesService
{
    // dao
    private AccessDao $accessDao;

    public function __construct(AccessDao $accessDao)
    {
        $this->accessDao = $accessDao;
    }

    /**
     * 列表
     * @param UM|null $user
     * @param int|null $page
     * @param int|null $page_size
     * @return Collection
     */
    public function index(?UM $user, ?int $page = null, ?int $page_size = null): Collection
    {
        //这里如果要修改查询，建议把查询放到dao层去
        return $this->accessDao->select();
    }
}
